<template >
  <div class="Show">
    <div v-for="(item,index) in items" :key="index" :class="currentIndex===index?'active':''" @click="Click(index)">
      {{ item }}
    </div>
  </div>
</template>
<script>
export default {
    props: ["items"],
    data() {
        return {
            currentIndex: 0,
            List:["衣服页面","鞋子页面","裤子页面"]
        }
    },

    methods: {
        Click(index)
        {
            this.currentIndex = index;
             this.$emit("change",this.List[index]);
        }
    },
};
</script>
<style scoped>
.Show {
  display: flex;
  flex: 1;
  justify-content: space-between;
  width: 300px;
}

.active
{
    color: red;
    font-weight: 700;
    border-bottom: 3px red solid;

}
 
</style>